//在主函数中从键盘接收X, Y , Z3个数，编写函数计算这3个数的立方和并返回计算结果：S=X3+Y3+Z3

import java.util.Scanner;

public class 求立方和 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入X：");
        int x = scanner.nextInt();
        System.out.println("请输入Y：");
        int y = scanner.nextInt();
        System.out.println("请输入Z：");
        int z = scanner.nextInt();
        System.out.println("立方和：" + demo(x,y,z));
    }
    public static int demo(int x,int y, int z) {
        return x*x*x+y*y*y+z*z*z ;
    }
}
